/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package facades;

import entities.FormaPago;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author damfercer
 */
@Stateless
public class FormaPagoFacade extends AbstractFacade<FormaPago> {
    @PersistenceContext(unitName = "CorporatePU")
    private EntityManager em;
    private static Integer efectivoId=4;
    private static Integer visaId=5;
    private static Integer amexId=8;
    private static Integer masterCardId=9;
    private static Integer maestroId=10;
    private static Integer transferenciaId=11;
    
    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public FormaPagoFacade() {
        super(FormaPago.class);
    }
    
    public FormaPago getFormaPagoEfectivo(){
        return this.find(efectivoId);
    }
    
    public FormaPago getFormaPagoVisa(){
        return this.find(visaId);
    }
    
    public FormaPago getFormaPagoAmex(){
        return this.find(amexId);
    }
    
    public FormaPago getFormaPagoMasterCard(){
        return this.find(masterCardId);
    }
    
    public FormaPago getFormaPagoMaestro(){
        return this.find(maestroId);
    }
    
    public FormaPago getFormaPagoTransferencia(){
        return this.find(transferenciaId);
    }
}
